/*
 * @Description: 指针的数学运算
 * @Version: 1.0
 * @Author: marshal
 * @Date: 2022-06-20 10:50:57
 * @LastEditors: marshal
 * @LastEditTime: 2022-06-20 11:03:11
 */
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int a = 10;
    int *pa = &a;
    // note: 因为int类型长度为4，所以int类型的指针+1就是指针地址+4
    printf("size of int = %ld\n", sizeof(int)); // 4
    printf("pa = %p\n", pa);                    // 0x7ffe3ba591fc
    printf("pa = %p\n", pa + 1);                // 0x7ffe3ba59200
    printf("pa = %p\n", pa + 2);                // 0x7ffe3ba59204
    return 0;
}
